/*
 * @Author: yangfan 1437446666@qq.com
 * @Date: 2023-02-27 11:49:28
 * @LastEditors: yangfan 1437446666@qq.com
 * @LastEditTime: 2023-03-06 08:36:30
 * @FilePath: \s_2006A_shixun\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
//导入
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//导入
import STable from '@surely-vue/table'

import ViewUIPlus from 'view-ui-plus'
import 'view-ui-plus/dist/styles/viewuiplus.css'

import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import VueMarkdownEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css'
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js'
import '@kangc/v-md-editor/lib/theme/style/vuepress.css'
import Prism from 'prismjs'

const webackCompont = require.context('./components', true, /\.vue$/)
VueMarkdownEditor.use(vuepressTheme, {
  Prism
})

import vant from 'vant'
// 2. 引入组件样式
import 'vant/lib/index.css'

// 3. 注册你需要的组件

const app = createApp(App)
const webackCompontS = webackCompont.keys().forEach((item) => {
  const utrl = webackCompont(item).default
  app.component(utrl.name, utrl)
})
app.use(VueMarkdownEditor)
app.use(ElementPlus, { size: 'small', zIndex: 3000 })
app.use(Antd).use(store).use(ViewUIPlus).use(router).use(vant).mount('#app')
